import {request} from "@/api";
import {Page} from "@/api/types.ts";
import {SysParam} from "@/api/param/types.ts";

const apiPrefix = '/varian-system/param'
export const paramApi = {
    add: (data: any) => request.post(`${apiPrefix}`, {data}),
    page: (params: any) => request.get<Page<SysParam>>(`${apiPrefix}/page`, {params}),
    detail: (id: string) => request.get<SysParam>(`${apiPrefix}/${id}`),
    modify: (data: SysParam) => request.put(`${apiPrefix}/${data.id}`, {data}),
    delete: (id: string) => request.delete(`${apiPrefix}/${id}`),
}